/******************************************************************************************
 * Import
 ******************************************************************************************/

// module
import Taro, { Component } from '@tarojs/taro'

// project
import { CPage, CContent, CHeader, CFooter, CFloat, CAround, CBetween, CCenter, CColumn, CRow, CWrap, CLine, CHand, CItemX, CItemY, CText, CLabel, CSvg, CImage, CButton } from '../../library/comp';
import { Base64, Gen, Time, Zip, Session, Storage, Http } from '../../library/func';
import Icon from '../../project/style/icon';

/******************************************************************************************
 * Export Class
 ******************************************************************************************/

export default class Index extends Component {
	
	/*------------------------------------------------------------------------------------
	 * 初始化
	 *-----------------------------------------------------------------------------------*/
	constructor(props) {
		super(props);

		/**
		 * state
		 */
		this.state = {
			background: '#f60',
			status: 'success'
		}
	}

	/*------------------------------------------------------------------------------------
	 * 生命周期
	 *-----------------------------------------------------------------------------------*/
	// didMount
	componentDidMount() {

	}
	
	/*------------------------------------------------------------------------------------
	 * 事件处理
	 *-----------------------------------------------------------------------------------*/
	// onClick
	onClick = (id, e)=> {
		console.log('onClick: ' + id)
    }
    
    // onRedirect
    onRedirect = (url, e)=> {
        wx.redirectTo({
            url: url
        })
    }

    // onNavigate
    onNavigate = (url, e)=> {

    }

	/*------------------------------------------------------------------------------------
	 * 自定义方法
	 *-----------------------------------------------------------------------------------*/

	/*------------------------------------------------------------------------------------
	 * 渲染
	 *-----------------------------------------------------------------------------------*/
	render () {
		return (
			<CPage>
				<CContent>
					<CLabel pa='5' bg='#e6e6e6' ra='20'>测试</CLabel>
					<CBetween h='50' bg='#f60' mt='10'>
						<CRow h='20' bg='#999' class='f02'></CRow>
						<CRow h='40' bg='#666' class='f02'></CRow>
					</CBetween>
					<CColumn ba='1 solid #ddd' ma='10' ra='10'>
						<CBetween bg='#f3f3f3' rt='9' pa='5 10'>
							<CText>测试</CText>
							<CTouch>
								<CText>更多...</CText>
							</CTouch>
						</CBetween>
						<CAround py='10' bt='1 solid #ddd'>
							<CItemY>
								<CSvg w='25' h='25'  icon={Icon.heart}></CSvg>
								<CText color='#999'>流星用户</CText>
							</CItemY>
							<CItemY>
								<CSvg w='25' h='25'></CSvg>
								<CText color='#999'>流星用户</CText>
							</CItemY>
							<CItemY>
								<CSvg w='25' h='25'></CSvg>
								<CText color='#999'>流星用户</CText>
							</CItemY>
							<CItemY>
								<CSvg w='25' h='25'></CSvg>
								<CText color='#999'>流星用户</CText>
							</CItemY>
						</CAround>
					</CColumn>
				</CContent>
			</CPage>
		)
	}
}


